using Google.ProtocolBuffers;
using micromsg.Proto;
using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
namespace micromsg
{
	[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
	public sealed class UploadHDHeadImgRequest : GeneratedMessageLite<UploadHDHeadImgRequest, UploadHDHeadImgRequest.Builder>
	{
		[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
		public sealed class Builder : GeneratedBuilderLite<UploadHDHeadImgRequest, UploadHDHeadImgRequest.Builder>
		{
			private bool resultIsReadOnly;
			private UploadHDHeadImgRequest result;
			protected override UploadHDHeadImgRequest.Builder ThisBuilder
			{
				get
				{
					return this;
				}
			}
			public override bool IsInitialized
			{
				get
				{
					return this.result.IsInitialized;
				}
			}
			protected override UploadHDHeadImgRequest MessageBeingBuilt
			{
				get
				{
					return this.PrepareBuilder();
				}
			}
			public override UploadHDHeadImgRequest DefaultInstanceForType
			{
				get
				{
					return UploadHDHeadImgRequest.DefaultInstance;
				}
			}
			public BaseRequest BaseRequest
			{
				get
				{
					return this.result.BaseRequest;
				}
				set
				{
					this.SetBaseRequest(value);
				}
			}
			public uint TotalLen
			{
				get
				{
					return this.result.TotalLen;
				}
				set
				{
					this.SetTotalLen(value);
				}
			}
			public uint StartPos
			{
				get
				{
					return this.result.StartPos;
				}
				set
				{
					this.SetStartPos(value);
				}
			}
			public uint HeadImgType
			{
				get
				{
					return this.result.HeadImgType;
				}
				set
				{
					this.SetHeadImgType(value);
				}
			}
			public SKBuiltinBuffer_t Data
			{
				get
				{
					return this.result.Data;
				}
				set
				{
					this.SetData(value);
				}
			}
			public string ImgHash
			{
				get
				{
					return this.result.ImgHash;
				}
				set
				{
					this.SetImgHash(value);
				}
			}
			public Builder()
			{
				this.result = UploadHDHeadImgRequest.DefaultInstance;
				this.resultIsReadOnly = true;
			}
			internal Builder(UploadHDHeadImgRequest cloneFrom)
			{
				this.result = cloneFrom;
				this.resultIsReadOnly = true;
			}
			private UploadHDHeadImgRequest PrepareBuilder()
			{
				if (this.resultIsReadOnly)
				{
					UploadHDHeadImgRequest other = this.result;
					this.result = new UploadHDHeadImgRequest();
					this.resultIsReadOnly = false;
					this.MergeFrom(other);
				}
				return this.result;
			}
			public override UploadHDHeadImgRequest.Builder Clear()
			{
				this.result = UploadHDHeadImgRequest.DefaultInstance;
				this.resultIsReadOnly = true;
				return this;
			}
			public override UploadHDHeadImgRequest.Builder Clone()
			{
				if (this.resultIsReadOnly)
				{
					return new UploadHDHeadImgRequest.Builder(this.result);
				}
				return new UploadHDHeadImgRequest.Builder().MergeFrom(this.result);
			}
			public override UploadHDHeadImgRequest BuildPartial()
			{
				if (this.resultIsReadOnly)
				{
					return this.result;
				}
				this.resultIsReadOnly = true;
				return this.result.MakeReadOnly();
			}
			public override UploadHDHeadImgRequest.Builder MergeFrom(IMessageLite other)
			{
				if (other is UploadHDHeadImgRequest)
				{
					return this.MergeFrom((UploadHDHeadImgRequest)other);
				}
				base.MergeFrom(other);
				return this;
			}
			public override UploadHDHeadImgRequest.Builder MergeFrom(UploadHDHeadImgRequest other)
			{
				return this;
			}
			public override UploadHDHeadImgRequest.Builder MergeFrom(ICodedInputStream input)
			{
				return this.MergeFrom(input, ExtensionRegistry.Empty);
			}
			public override UploadHDHeadImgRequest.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
			{
				this.PrepareBuilder();
				uint num;
				string text;
				while (input.ReadTag(out num, out text))
				{
					if (num == 0u && text != null)
					{
						int num2 = Array.BinarySearch<string>(UploadHDHeadImgRequest._uploadHDHeadImgRequestFieldNames, text, StringComparer.get_Ordinal());
						if (num2 < 0)
						{
							this.ParseUnknownField(input, extensionRegistry, num, text);
							continue;
						}
						num = UploadHDHeadImgRequest._uploadHDHeadImgRequestFieldTags[num2];
					}
					uint num3 = num;
					if (num3 <= 16u)
					{
						if (num3 == 0u)
						{
							throw InvalidProtocolBufferException.InvalidTag();
						}
						if (num3 == 10u)
						{
							BaseRequest.Builder builder = BaseRequest.CreateBuilder();
							if (this.result.hasBaseRequest)
							{
								builder.MergeFrom(this.BaseRequest);
							}
							input.ReadMessage(builder, extensionRegistry);
							this.BaseRequest = builder.BuildPartial();
							continue;
						}
						if (num3 == 16u)
						{
							this.result.hasTotalLen = input.ReadUInt32(ref this.result.totalLen_);
							continue;
						}
					}
					else
					{
						if (num3 <= 32u)
						{
							if (num3 == 24u)
							{
								this.result.hasStartPos = input.ReadUInt32(ref this.result.startPos_);
								continue;
							}
							if (num3 == 32u)
							{
								this.result.hasHeadImgType = input.ReadUInt32(ref this.result.headImgType_);
								continue;
							}
						}
						else
						{
							if (num3 == 42u)
							{
								SKBuiltinBuffer_t.Builder builder2 = SKBuiltinBuffer_t.CreateBuilder();
								if (this.result.hasData)
								{
									builder2.MergeFrom(this.Data);
								}
								input.ReadMessage(builder2, extensionRegistry);
								this.Data = builder2.BuildPartial();
								continue;
							}
							if (num3 == 50u)
							{
								this.result.hasImgHash = input.ReadString(ref this.result.imgHash_);
								continue;
							}
						}
					}
					if (WireFormat.IsEndGroupTag(num))
					{
						return this;
					}
					this.ParseUnknownField(input, extensionRegistry, num, text);
				}
				return this;
			}
			public UploadHDHeadImgRequest.Builder SetBaseRequest(BaseRequest value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasBaseRequest = true;
				this.result.baseRequest_ = value;
				return this;
			}
			public UploadHDHeadImgRequest.Builder SetBaseRequest(BaseRequest.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.hasBaseRequest = true;
				this.result.baseRequest_ = builderForValue.Build();
				return this;
			}
			public UploadHDHeadImgRequest.Builder MergeBaseRequest(BaseRequest value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				if (this.result.hasBaseRequest && this.result.baseRequest_ != BaseRequest.DefaultInstance)
				{
					this.result.baseRequest_ = BaseRequest.CreateBuilder(this.result.baseRequest_).MergeFrom(value).BuildPartial();
				}
				else
				{
					this.result.baseRequest_ = value;
				}
				this.result.hasBaseRequest = true;
				return this;
			}
			public UploadHDHeadImgRequest.Builder ClearBaseRequest()
			{
				this.PrepareBuilder();
				this.result.hasBaseRequest = false;
				this.result.baseRequest_ = null;
				return this;
			}
			public UploadHDHeadImgRequest.Builder SetTotalLen(uint value)
			{
				this.PrepareBuilder();
				this.result.hasTotalLen = true;
				this.result.totalLen_ = value;
				return this;
			}
			public UploadHDHeadImgRequest.Builder ClearTotalLen()
			{
				this.PrepareBuilder();
				this.result.hasTotalLen = false;
				this.result.totalLen_ = 0u;
				return this;
			}
			public UploadHDHeadImgRequest.Builder SetStartPos(uint value)
			{
				this.PrepareBuilder();
				this.result.hasStartPos = true;
				this.result.startPos_ = value;
				return this;
			}
			public UploadHDHeadImgRequest.Builder ClearStartPos()
			{
				this.PrepareBuilder();
				this.result.hasStartPos = false;
				this.result.startPos_ = 0u;
				return this;
			}
			public UploadHDHeadImgRequest.Builder SetHeadImgType(uint value)
			{
				this.PrepareBuilder();
				this.result.hasHeadImgType = true;
				this.result.headImgType_ = value;
				return this;
			}
			public UploadHDHeadImgRequest.Builder ClearHeadImgType()
			{
				this.PrepareBuilder();
				this.result.hasHeadImgType = false;
				this.result.headImgType_ = 0u;
				return this;
			}
			public UploadHDHeadImgRequest.Builder SetData(SKBuiltinBuffer_t value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasData = true;
				this.result.data_ = value;
				return this;
			}
			public UploadHDHeadImgRequest.Builder SetData(SKBuiltinBuffer_t.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.hasData = true;
				this.result.data_ = builderForValue.Build();
				return this;
			}
			public UploadHDHeadImgRequest.Builder MergeData(SKBuiltinBuffer_t value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				if (this.result.hasData && this.result.data_ != SKBuiltinBuffer_t.DefaultInstance)
				{
					this.result.data_ = SKBuiltinBuffer_t.CreateBuilder(this.result.data_).MergeFrom(value).BuildPartial();
				}
				else
				{
					this.result.data_ = value;
				}
				this.result.hasData = true;
				return this;
			}
			public UploadHDHeadImgRequest.Builder ClearData()
			{
				this.PrepareBuilder();
				this.result.hasData = false;
				this.result.data_ = null;
				return this;
			}
			public UploadHDHeadImgRequest.Builder SetImgHash(string value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasImgHash = true;
				this.result.imgHash_ = value;
				return this;
			}
			public UploadHDHeadImgRequest.Builder ClearImgHash()
			{
				this.PrepareBuilder();
				this.result.hasImgHash = false;
				this.result.imgHash_ = "";
				return this;
			}
		}
		public const int BaseRequestFieldNumber = 1;
		public const int TotalLenFieldNumber = 2;
		public const int StartPosFieldNumber = 3;
		public const int HeadImgTypeFieldNumber = 4;
		public const int DataFieldNumber = 5;
		public const int ImgHashFieldNumber = 6;
		private static readonly UploadHDHeadImgRequest defaultInstance;
		private static readonly string[] _uploadHDHeadImgRequestFieldNames;
		private static readonly uint[] _uploadHDHeadImgRequestFieldTags;
		private bool hasBaseRequest;
		private BaseRequest baseRequest_;
		private bool hasTotalLen;
		private uint totalLen_;
		private bool hasStartPos;
		private uint startPos_;
		private bool hasHeadImgType;
		private uint headImgType_;
		private bool hasData;
		private SKBuiltinBuffer_t data_;
		private bool hasImgHash;
		private string imgHash_ = "";
		private int memoizedSerializedSize = -1;
		public static UploadHDHeadImgRequest DefaultInstance
		{
			get
			{
				return UploadHDHeadImgRequest.defaultInstance;
			}
		}
		public override UploadHDHeadImgRequest DefaultInstanceForType
		{
			get
			{
				return UploadHDHeadImgRequest.DefaultInstance;
			}
		}
		protected override UploadHDHeadImgRequest ThisMessage
		{
			get
			{
				return this;
			}
		}
		public BaseRequest BaseRequest
		{
			get
			{
				return this.baseRequest_ ?? BaseRequest.DefaultInstance;
			}
		}
		public uint TotalLen
		{
			get
			{
				return this.totalLen_;
			}
		}
		public uint StartPos
		{
			get
			{
				return this.startPos_;
			}
		}
		public uint HeadImgType
		{
			get
			{
				return this.headImgType_;
			}
		}
		public SKBuiltinBuffer_t Data
		{
			get
			{
				return this.data_ ?? SKBuiltinBuffer_t.DefaultInstance;
			}
		}
		public string ImgHash
		{
			get
			{
				return this.imgHash_;
			}
		}
		public override bool IsInitialized
		{
			get
			{
				return this.hasBaseRequest && this.hasTotalLen && this.hasStartPos && this.hasHeadImgType && this.hasData && this.BaseRequest.IsInitialized && this.Data.IsInitialized;
			}
		}
		public override int SerializedSize
		{
			get
			{
				int num = this.memoizedSerializedSize;
				if (num != -1)
				{
					return num;
				}
				num = 0;
				if (this.hasBaseRequest)
				{
					num += CodedOutputStream.ComputeMessageSize(1, this.BaseRequest);
				}
				if (this.hasTotalLen)
				{
					num += CodedOutputStream.ComputeUInt32Size(2, this.TotalLen);
				}
				if (this.hasStartPos)
				{
					num += CodedOutputStream.ComputeUInt32Size(3, this.StartPos);
				}
				if (this.hasHeadImgType)
				{
					num += CodedOutputStream.ComputeUInt32Size(4, this.HeadImgType);
				}
				if (this.hasData)
				{
					num += CodedOutputStream.ComputeMessageSize(5, this.Data);
				}
				if (this.hasImgHash)
				{
					num += CodedOutputStream.ComputeStringSize(6, this.ImgHash);
				}
				this.memoizedSerializedSize = num;
				return num;
			}
		}
		private UploadHDHeadImgRequest()
		{
		}
		public override void WriteTo(ICodedOutputStream output)
		{
			int arg_06_0 = this.SerializedSize;
			string[] uploadHDHeadImgRequestFieldNames = UploadHDHeadImgRequest._uploadHDHeadImgRequestFieldNames;
			if (this.hasBaseRequest)
			{
				output.WriteMessage(1, uploadHDHeadImgRequestFieldNames[0], this.BaseRequest);
			}
			if (this.hasTotalLen)
			{
				output.WriteUInt32(2, uploadHDHeadImgRequestFieldNames[5], this.TotalLen);
			}
			if (this.hasStartPos)
			{
				output.WriteUInt32(3, uploadHDHeadImgRequestFieldNames[4], this.StartPos);
			}
			if (this.hasHeadImgType)
			{
				output.WriteUInt32(4, uploadHDHeadImgRequestFieldNames[2], this.HeadImgType);
			}
			if (this.hasData)
			{
				output.WriteMessage(5, uploadHDHeadImgRequestFieldNames[1], this.Data);
			}
			if (this.hasImgHash)
			{
				output.WriteString(6, uploadHDHeadImgRequestFieldNames[3], this.ImgHash);
			}
		}
		public override int GetHashCode()
		{
			int num = base.GetType().GetHashCode();
			if (this.hasBaseRequest)
			{
				num ^= this.baseRequest_.GetHashCode();
			}
			if (this.hasTotalLen)
			{
				num ^= this.totalLen_.GetHashCode();
			}
			if (this.hasStartPos)
			{
				num ^= this.startPos_.GetHashCode();
			}
			if (this.hasHeadImgType)
			{
				num ^= this.headImgType_.GetHashCode();
			}
			if (this.hasData)
			{
				num ^= this.data_.GetHashCode();
			}
			if (this.hasImgHash)
			{
				num ^= this.imgHash_.GetHashCode();
			}
			return num;
		}
		public override bool Equals(object object_0)
		{
			UploadHDHeadImgRequest uploadHDHeadImgRequest = object_0 as UploadHDHeadImgRequest;
			return uploadHDHeadImgRequest != null && (this.hasBaseRequest == uploadHDHeadImgRequest.hasBaseRequest && (!this.hasBaseRequest || this.baseRequest_.Equals(uploadHDHeadImgRequest.baseRequest_))) && (this.hasTotalLen == uploadHDHeadImgRequest.hasTotalLen && (!this.hasTotalLen || this.totalLen_.Equals(uploadHDHeadImgRequest.totalLen_))) && (this.hasStartPos == uploadHDHeadImgRequest.hasStartPos && (!this.hasStartPos || this.startPos_.Equals(uploadHDHeadImgRequest.startPos_))) && (this.hasHeadImgType == uploadHDHeadImgRequest.hasHeadImgType && (!this.hasHeadImgType || this.headImgType_.Equals(uploadHDHeadImgRequest.headImgType_))) && (this.hasData == uploadHDHeadImgRequest.hasData && (!this.hasData || this.data_.Equals(uploadHDHeadImgRequest.data_))) && (this.hasImgHash == uploadHDHeadImgRequest.hasImgHash && (!this.hasImgHash || this.imgHash_.Equals(uploadHDHeadImgRequest.imgHash_)));
		}
		public override void PrintTo(TextWriter writer)
		{
			GeneratedMessageLite<UploadHDHeadImgRequest, UploadHDHeadImgRequest.Builder>.PrintField("BaseRequest", this.hasBaseRequest, this.baseRequest_, writer);
			GeneratedMessageLite<UploadHDHeadImgRequest, UploadHDHeadImgRequest.Builder>.PrintField("TotalLen", this.hasTotalLen, this.totalLen_, writer);
			GeneratedMessageLite<UploadHDHeadImgRequest, UploadHDHeadImgRequest.Builder>.PrintField("StartPos", this.hasStartPos, this.startPos_, writer);
			GeneratedMessageLite<UploadHDHeadImgRequest, UploadHDHeadImgRequest.Builder>.PrintField("HeadImgType", this.hasHeadImgType, this.headImgType_, writer);
			GeneratedMessageLite<UploadHDHeadImgRequest, UploadHDHeadImgRequest.Builder>.PrintField("Data", this.hasData, this.data_, writer);
			GeneratedMessageLite<UploadHDHeadImgRequest, UploadHDHeadImgRequest.Builder>.PrintField("ImgHash", this.hasImgHash, this.imgHash_, writer);
		}
		public static UploadHDHeadImgRequest ParseFrom(byte[] data)
		{
			return UploadHDHeadImgRequest.CreateBuilder().MergeFrom(data).BuildParsed();
		}
		private UploadHDHeadImgRequest MakeReadOnly()
		{
			return this;
		}
		public static UploadHDHeadImgRequest.Builder CreateBuilder()
		{
			return new UploadHDHeadImgRequest.Builder();
		}
		public override UploadHDHeadImgRequest.Builder ToBuilder()
		{
			return UploadHDHeadImgRequest.CreateBuilder(this);
		}
		public override UploadHDHeadImgRequest.Builder CreateBuilderForType()
		{
			return new UploadHDHeadImgRequest.Builder();
		}
		public static UploadHDHeadImgRequest.Builder CreateBuilder(UploadHDHeadImgRequest prototype)
		{
			return new UploadHDHeadImgRequest.Builder(prototype);
		}
		static UploadHDHeadImgRequest()
		{
			UploadHDHeadImgRequest.defaultInstance = new UploadHDHeadImgRequest().MakeReadOnly();
			UploadHDHeadImgRequest._uploadHDHeadImgRequestFieldNames = new string[]
			{
				"BaseRequest",
				"Data",
				"HeadImgType",
				"ImgHash",
				"StartPos",
				"TotalLen"
			};
			UploadHDHeadImgRequest._uploadHDHeadImgRequestFieldTags = new uint[]
			{
				10u,
				42u,
				32u,
				50u,
				24u,
				16u
			};
			object.ReferenceEquals(micromsg.Proto.UploadHDHeadImgRequest.Descriptor, null);
		}
	}
}
